[jQuery UI - Accordion] Styling active header?

Posted by RC on Stack Overflow See other posts from Stack Overflow or by RC
Published on 2009-11-19T18:21:16Z Indexed on 2010/05/09 22:18 UTC
Read the original article Hit count: 196

Filed under:
|
|
|
|

Hi,

Simple issue: I am using Accordion without any UI themes (just barebones, using my own CSS).

So far, so good, except that I cannot figure out how to set an "active" style for the currently selected header.

The jQuery code:

$("#menu").accordion({
event:"mouseover",header:"a.top"
});

The HTML code:

<a href="#" class="top">XXX1</a>
<div class="sub">
   <a href="#">Subheading 1</a>
   <a href="#">Subheading 2</a>
   <a href="#">Subheading 3</a>
</div>

<a href="#" class="top">XXX2</a>
<div class="sub">
   <a href="#">Subheading 1</a>
   <a href="#">Subheading 2</a>
   <a href="#">Subheading 3</a>
</div>

This works great, except that I cannot find a way to define the styles for the active header without using ThemeRoller.

Manually setting the following styles in my CSS has no effect:

.ui-state-active
.ui-widget-content .ui-state-active
.ui-state-active a
.ui-state-active a:link
.ui-state-active a:visited

Assistance, please?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about accordion